Motor speed controller

ABSTRACT

In a motor speed controller, feedback control is implemented at a gain independent of the target rotational speed ωT while the increase in the circuit size or processing load is reduced. The rotational speed ω of the motor is controlled on the basis of a pulse signal in which a pulse period τP varies in inverse proportion to ω. A count clock generation circuit varies the clock frequency FC in proportion to ωT. The pulse period measurement section counts the count clock CLK during τP at the present ω and determines a measured count value C. The feedback filter inputs, as an error signal Ve, the difference between C and a target count value CN that corresponds to ωT, and generates an instruction signal to provide compensation for Ve. The feedback filter scales the instruction signal at a scaling factor that is proportional to ωT.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority from Japanese application JP 2009-012799 filed on Jan. 23, 2009, the content of which is hereby incorporated by reference into this application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a motor speed controller for controlling rotational speed on the basis of a pulse signal in which the pulse period is inversely proportional to the rotational speed of the motor.

2. Description of the Related Art

The speed of a motor can be controlled by obtaining from a motor module a pulse signal PI in which the period varies in accordance with the rotational speed ω of the motor. A motor speed controller measures the period τ_(P) of the pulses appearing in a pulse signal, detects the rotational speed ω of the motor from that period, and drives a motor so that the rotational speed ω is brought to a target value ω_(T).

The pulse period τ_(P) is measured by a count value C of a reference clock CLK having a designated frequency F_(C). The count value C is given by the following formula, where F_(P) is the frequency of the pulse signal PI. C=F _(C) /F _(P)

The formula can be rewritten as α=F _(C) /F _(P) ² where α is the weight (C/F_(P)) of the count value C per unit quantity of the frequency F_(P).

The weight α is the ratio of the count value C to frequency F_(P) when measuring the pulse period τ_(P) of the input pulse PI by the count value C. This formula shows that a changes greatly in inverse proportion to the square of F_(P). For example, a 100-fold change in F_(P) produces a 10,000-fold change in α. Therefore, in the case when performing feedback control on the rotational speed ω of the motor using an error signal Ve, which is proportional to the difference between the present value and the target value of the count value C, when the target rotational speed ω_(T) changes, the generation gain of the error signal Ve changes greatly by the change of the frequency F_(P) that corresponds to ω_(T), and consequently the gain of the feedback loop also changes greatly.

For example, the speed of a motor that drives a zoom mechanism of a camera changes in accordance with the speed of hand trembling and the movement of the photographed object. At that time, α decreases as the speed of the movement to be tracked becomes higher, and an inconvenience arises in which the trackability of feedback control is reduced.

Thus, the conventional motor speed control based on pulse period τ_(P) has an aspect that it is difficult to handle. Here, if the count value C is converted into a signal that corresponds to the frequency F_(P) by calculating the reciprocal of the count value C and multiplying the reciprocal by a suitable factor, then the error signal Ve in feedback control becomes a linear function of the frequency F_(P). In this case, the gain of the feedback loop is a constant value that does not depend on the target rotational speed ω_(T).

[Patent Document]

Japanese Laid-open Patent Publication No. 10-174474

SUMMARY OF THE INVENTION

When a logic circuit is provided separately in order to perform the calculation to convert the count value C to a signal that corresponds to the frequency F_(P), the circuit increases in size. On the other hand, in the case when the computation was performed using a microprocessor, there was a problem that the processing load was increased. The problem is particularly great in the division operation performed to determine the reciprocal.

The present invention was made in order to solve the above problem, and the invention provides a motor speed controller in which feedback control is performed with a gain that does not depend on the target rotational speed ω_(T), and in which there is no need to perform a conversion from the count value C to a frequency signal, and the problem of increased circuit size or processing load is alleviated.

The motor speed controller according to the present invention is a controller for controlling rotational speed of the motor on the basis of a pulse signal in which the pulse period varies in inverse proportion to the rotational speed, comprising: a count clock generator for generating a count clock with the clock frequency varying in accordance with a target rotational speed of the motor to keep a count value within the pulse period at the target rotational speed a constant target numerical value independent of the target rotational speed; and a feedback control section for bringing the rotational speed closer to the target rotational speed by feedback control, wherein the feedback control section has a pulse period measurement section for counting the clock pulse in the pulse period at the current rotational speed and determining a measured count value, an error signal generator for generating an error signal that corresponds to the difference between the measured count value and the target count value, and a compensation instruction signal generator for generating a compensation instruction signal designed to adjust the rotational speed to the target rotational speed on the basis of the error signal; and wherein the compensation instruction signal generator scales the compensation instruction signal at a scaling factor that is proportional to the target rotational speed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram illustrating the functional structure of a motor speed controller according to an embodiment of the present invention;

FIG. 2 is a block diagram of the drive target register, feedforward filter, feedback filter, and synthesis circuit of the motor speed controller according to an embodiment of the present invention;

FIG. 3 is a signal waveform chart illustrating the pulse period measurement method of the motor speed controller according to an embodiment of the present invention;

FIG. 4 is a flowchart illustrating the operation in which the state of out-of-control reverse rotation is determined by the motor speed controller according to an embodiment of the present invention;

FIG. 5 is a flowchart illustrating the operation in which an original state has been restored by the motor speed controller according to an embodiment of the present invention; and

FIG. 6 is a view showing the relationship between rotational speed and pulse period illustrating the restoration operation.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the present invention (henceforth, “embodiments”) are explained below with reference to the drawings.

[Controller Structure]

FIG. 1 is a schematic block diagram illustrating the functional structure of a motor speed controller 20 according to an embodiment of the present invention. The motor speed controller 20 is set parameters such as control target values from an MPU (Micro Processing Unit) 22, and generates a PWM (Pulse Width Modulation) signal for a motor drive circuit 24. The motor drive circuit 24 has an H bridge circuit, and converts the PWM signal from the motor speed controller 20 to a drive signal for a motor module 26 by using the H bridge circuit. The motor module 26 includes a DC motor, a drive mechanism, and an encoder. The drive mechanism, for example, is a zoom mechanism of a camera. The DC motor rotates at a rotational speed that is substantially proportional to the voltage of the drive signal from the motor drive circuit 24, and can switch the direction of rotation in accordance with the polarity of the voltage. The encoder detects the amount of rotation of the DC motor directly or indirectly from the amount of driving of the drive mechanism. The encoder generates a pulse for each designated angle of rotation of the DC motor, and the pulse is input as a pulse signal PI to the motor speed controller 20.

The motor speed controller 20 has a drive target register 30, a target count value register 32, a control register 34, a feedforward filter 36, a pulse period measurement section 38, a count clock generation circuit 40, a comparison circuit 42, a feedback filter 44, a synthesis circuit 46, a PWM signal generation circuit 48, and a bus 50. FIG. 2 is a block diagram of the drive target register 30, feedforward filter 36, feedback filter 44, and synthesis circuit 46 in the motor speed controller 20.

The drive target register 30 and feedforward filter 36 constitute a feedforward control section for generating a target instruction signal that is defined in accordance with a target rotational speed ω_(T), and setting the rotational speed of the motor to the target rotational speed by feedforward control.

The drive target register 30 stores a target setting value Kr that is set in accordance with the target rotational speed ω_(T) of the motor. The target setting value Kr is set as a value obtained by attaching a sign that corresponds to the direction (rotational direction) of the target rotational speed ω_(T) to the absolute value proportional to the magnitude of the target rotational speed ω_(T). The target setting value Kr is stored in the drive target register 30.

The feedforward filter 36 generates a target instruction signal on the basis of the target setting value Kr stored in the drive target register 30. As shown in FIG. 2, the feedforward filter 36 has a filter 60 whose transfer function corresponds to the motor as the object of driving, and a multiplier 62. The target setting value Kr read from the drive target register 30 is input to the multiplier 62 via the filter 60. Although the target rotational speed C_(T) can be variably set in the motor speed controller 20, the multiplication factor (gain) Ks of the multiplier 62 is set as a constant value that does not depend on the variably set target rotational speed ω_(T). The multiplier 62 generates a target instruction signal by multiplying Ks by the output signal of the filter 60 that corresponds to the target setting value Kr.

Ks can be set to an upper-limit value ω_(MAX) of a predetermined adjustable range for the target rotational speed ω_(T). In this case, the target setting value Kr is set as a relative value obtained by dividing the target rotational speed ω_(T) by the set upper-limit value ω_(MAX).

The target count value register 32, pulse period measurement section 38, and feedback filter 44 constitute a feedback control section that performs feedback control for generating an error signal Ve that corresponds to the difference between the present rotational speed ω and the target rotational speed ω_(T), generating a compensation instruction signal on the basis of the error signal Ve, and bringing the rotational speed ω closer to the target rotational speed ω_(T).

The pulse period measurement section 38 inputs the pulse signal PI from the motor module 26, and detects the pulses appearing in the pulse signal PI. The pulses are generated substantially in accordance with the rotation of the motor, and the pulse period τ_(P) varies in inverse proportion to the rotational speed ω of the motor. The pulse period measurement section 38 measures the pulse period τ_(P) by a count clock (reference clock) CLK. That is, the pulse period measurement section 38 counts the count clock CLK during the pulse period τ_(P) at the present rotational speed ω and determines a measured count value C that corresponds to the pulse period τ_(P).

The count clock generation circuit 40 divides the frequency of a master clock having a designated frequency to generate a count clock CLK, and supplies the clock to the pulse period measurement section 38. The count clock generation circuit 40 varies the frequency F_(C) of the count clock CLK in accordance with the target rotational speed ω_(T) of the motor, and creates a condition in which the count value C from the pulse period measurement section 38 in the pulse period τ_(P) that corresponds to the target rotational speed ω_(T) remains a constant target count value C_(N) that does not depend on the target rotational speed ω_(T). For example, the count clock generation circuit 40 can use the target setting value Kr stored by the drive target register 30 to keep the target count value C_(N) constant by varying the frequency F_(C) in proportion to the target setting value Kr.

The target count value C_(N) is set in the target count value register 32. The comparison circuit 42 determines the difference between the measured count value C output from the pulse period measurement section 38 and the target count value C_(N) stored by the target count value register 32, and generates an error signal Ve that corresponds to that difference (C−C_(N)).

The feedback filter 44 generates a compensation instruction signal for adjusting the rotational speed ω to the target rotational speed ω_(T) on the basis of the error signal Ve. As shown in FIG. 2, the feedback filter 44 has a PID filter 64 and a multiplier 66. The error signal Ve from the comparison circuit 42 is input to the PID filter 64. The PID filter 64 subjects the error signal Ve to a P operation, an I operation, and a D operation in parallel, and then adds, combines, and outputs the processing results.

The multiplier 66 multiplies the factor (scaling factor) by the output of the PID filter 64. The output signal of the multiplier 66 is output as a compensation instruction signal from the feedback filter 44.

Here, the scaling factor of the multiplier 66 is set to a value that is proportional to the target rotational speed ω_(T). The compensation instruction signal is thereby scaled by a factor that corresponds to the target rotational speed ω_(T). In the present embodiment, the target setting value Kr is defined by a relative value of the target rotational speed ω_(T) with respect to the upper-limit value ω_(MAX) as described above, and the scaling factor of the multiplier 66 is set to the target setting value Kr stored in the drive target register 30. That is, when the target setting value Kr is set for the drive target register 30 from the MPU 22, the absolute value thereof becomes automatically used as the scaling factor of the multiplier 66, and there is no need to set the scaling factor separately.

The synthesis circuit 46 and the PWM signal generation circuit 48 constitute a drive control section for controlling the driving of the motor. The synthesis circuit 46 adds the target instruction signal output from the feedforward filter 36 and the compensation instruction signal output from the feedback filter 44, and generates a composite signal. The PWM signal generation circuit 48 generates a PWM signal in which the duty ratio varies in accordance with the value of the composite signal, and outputs the signal to the motor drive circuit 24.

Parameters that are stored in the control register 34 can be rewritten from the MPU 22, and the operations and processing contents of each section of the motor speed controller 20 can be controlled via those parameters.

As described above, the motor speed controller 20 varies the frequency F_(C) of the count clock CLK in accordance with the target rotational speed ω_(T), and keeps the target count value within the pulse period τ_(P) to a constant value C_(N) that does not depend on the The weight β of the count value C_(N) per unit quantity of the frequency F_(P) of the pulse period PI is thereby brought to β=C_(N)/F_(P). An error signal Ve that is generated on the basis of the count value C_(N) having weight β is input to the feedback filter 44. The motor speed controller 20 scales the compensation instruction signal by multiplying the scaling factor that is proportional to the target rotational speed ω_(T) in the multiplier 66 of the feedback filter 44. Because the scaling factor is proportional to the frequency F_(P), the gain of the feedback control in the motor speed controller 20 is a value that corresponds to the product of the weight β and the scaling factor of the multiplier 66, and is a constant value that does not depend on the target rotational speed ω_(T).

The target setting value Kr can be set, for example, as the target rotational speed ω_(T) itself, rather than as a relative value of the target rotational speed ω_(T) with respect to the upper-limit value ω_(MAX). In that case, the gain in the multiplier 62 should be set to 1 in the arrangement described above, and the arrangement can also be constituted so that the multiplier 62 itself is omitted.

In the arrangement described above, in the case when the target rotational speed ω_(T) is changed, the scaling factor of the multiplier 66 is automatically set in the contents of the drive target register 30. On the other hand, because the target count value C_(N) doesn't change even when the target rotational speed ω_(T) is changed, there is no need to change the contents of the target count value register 32.

It should be noted that even in the conventional arrangement in which the target count value is not kept constant within the pulse period τ_(P), it is possible to keep the gain of feedback control at a constant level that does not depend on ω_(T) by providing only a multiplier 66 and changing the scaling factor by the square of F_(P). However, the load on the digital computation in the multiplier 66 increases with the scaling factor. When the scaling factor is changed by the square of F_(P), for example, the scaling factor must change by a factor of 10,000 in the case when F_(P) changes by a factor of 100. This means that in the case when the multiplier 66 is constituted by a fixed-point digital arithmetic unit, it must be assumed that the number of places may change by 14 bits, and the increase of processing load and circuit size may become significant. On the other hand, in the constitution of the present invention, the range of variation of the number of places in the case when F_(P) changes by a factor of 100 is 7 bits, and the load is comparatively low.

The processing of the digital filters such as the PID filter 64 may substantially involve addition and multiplication. In the present embodiment, the device additionally provided to the feedback filter 44 is a multiplier 66, and providing a divider is not necessary. Therefore, it is possible to perform the multiplication processing in the multiplier 66 by sharing an ALU (Arithmetic Logic Unit) that performs the processing of the above digital filter. It is thus possible to avoid additionally providing the multiplier 66 as a separate circuit, and reduction in circuit size can be achieved.

The multiplier 66 can be placed in front of the PID filter 64, or respectively for each operation of P, I, and D in the PID filter 64.

[Operation During Switching of Target Rotational Speed ω_(T)]

Next the operation of the motor speed controller 20 is explained. The motor speed controller 20 comprises a feedforward control means that includes a feedforward filter 36, and a feedback control means that includes a feedback filter 44, and these filters operate substantially in parallel. In the normal state, the feedforward control serves the role of keeping mainly the DC level of the rotational speed u at the target rotational speed ω_(T), and the feedback control has the autonomous role of converging AC components of relatively small amplitude that are overlapped on the DC level.

The motor speed controller 20 can temporarily stop the feedback control when switching the target rotational speed ω_(T) in order to improve the dynamic response when starting rotation of the motor and at other times when switching the target rotational speed ω_(T).

In this operation, it is determined whether the present rotational speed ω is within a designated range R_(Δ) with respect to the target rotational speed ω_(T). Out of the feedforward means and the feedback means, only the feedforward control means is started if the speed is out of the range R_(Δ), and both of the means are started if the speed is within the range R_(Δ).

For example, setting a designated threshold Δ_(ω) can define the conditions so that the speed is within the range R_(Δ) if |ω−ω_(T)|Δ_(ω), and out of the range R_(Δ) if |ω−ω_(T)|>Δ_(ω).

Whether the speed is within the range of R_(Δ) can be determined, for example, on the basis of the error signal Ve. In view of this, the feedback filter 44 can be given an operation-switching function in which the operation of the PID filter 64 is stopped or restarted when the analysis is performed based on the error signal Ve.

One method of switching operation is to switch the feedback control on and off in accordance with the result of comparison of the deviation of rotational speed |ω−ω_(T)| and the threshold Δ_(ω) as described above. According to this method, the feedback control is not stopped if the deviation is at or below the threshold Δ_(ω) even if the target rotational speed ω_(T) is changed. On the other hand, the feedback control is stopped if the deviation is above the threshold Δ_(ω) even if the target rotational speed ω_(T) is not changed. Another possible method is to temporarily stop the feedback control without regard to the magnitude of the deviation if the target rotational speed ω_(T) is changed, and to restart the feedback control if the deviation is at or below the threshold.

By this operation, it becomes less likely that a large deviation that occurs when, for example, the target rotational speed ω_(T) is switched will remain in the arithmetic result in the feedback filter 44, and overshooting in which the rotational speed ω exceeds the target rotational speed ω_(T) is prevented or reduced. From this viewpoint, the feedback filter 44 preferably resets the arithmetic result up to that point to the initial state when operation of the filter is stopped.

In the present embodiment, the rotational speed ω is represented by the count value of the count clock CLK within the pulse period τ_(P). Therefore, whether the speed is within the range R_(Δ) is determined on the basis of the difference (C−C_(N)) between the measured count value C and the target count value C_(N). For example, setting a designated threshold Δ_(C) can define the conditions so that the speed is within the range R_(Δ) if |(C−C_(N))|≦Δ_(C), and is out of the range R_(Δ) if |(C−C_(N))|>Δ_(C).

[Measurement of Pulse Period τ_(P)]

The pulse period measurement section 38 measures the pulse period τ_(P) by counting the count clock CLK in order to ascertain the rotational speed ω. Accordingly, if the precision of detecting the pulse ends in the pulse signal PI is low, then the precision of motor speed control also decreases. Therefore, reducing the effect of chattering and other types of noise that may occur at the pulse ends is required.

FIG. 3 is a signal waveform chart illustrating the pulse period measurement method of the motor speed controller 20. In FIG. 3, the horizontal axis is the time axis, and the count clock CLK, the pulse signal PI, the fall (trailing edge) detection signal TE of the pulses in the pulse signal PI, the fall period count value NT, the rise (leading edge) detection signal LE of the pulses in the pulse signal, the rise period count value NL, and the count value C related to the pulse period τ_(P) are arrayed vertically, with their respective time axes in alignment.

In the example shown in FIG. 3, the motor speed controller 20 measures the pulse period τ_(P) on the basis of a pulse end in transition from an L-level state to an H-level state for the target pulses appearing in the pulse signal PI input to the motor speed controller 20 from the motor module 26.

The pulse period measurement section 38 samples the pulse signal PI, for example, at the timing of the rise of the count clock CLK supplied from the count clock generation circuit 40 (state detection step). In FIG. 3, the waveform 4 represents chattering that occurs at the leading and trailing edges of the pulse 2 of the pulse signal PI.

The pulse period measurement section 38 may start measuring the pulse period τ_(P) when the sampled value changes from L level to H level. Specifically, the pulse period measurement section 38 detects the change of the sampled value from L level to H level as the rise of the pulse signal PI, and generates a pulse 70 in the rise detection signal LE. The width of the pulse 70 is set to one period τ_(CLK) of the count clock CLK. When the pulse 70 rises, the pulse period measurement section 38 outputs as the measured count value C the present count value NL of a rise period counter for clocking the pulse period τ_(P) except in the case when the later-described exception handling is performed. This is a completion of measuring a pulse period τ_(P). The pulse period measurement section 38 begins the process of measuring a new pulse period τ_(P) from the period of the next count clock CLK (time T1). That is, the pulse period measurement section 38 resets the count value NL to 0 at time T1, and then begins incrementing by one the count value NL in synchronization with the count clock CLK.

The pulse period measurement section 38 begins clocking a designated inhibition period Pd when the sampled value changes from H level to L level (inhibition period clocking step). Specifically, the pulse period measurement section 38 detects the change of the sampled value from H level to L level as a fall of the pulse signal PI, and generates a pulse 72 to the fall detection signal TE. The width of the pulse 72 is set to τ_(CLK). When the pulse 72 rises, the pulse period measurement section 38 stops counting of the fall period counter up to then, and begins the process of clocking a new inhibition period Pd from the period of the next count clock CLK (time T1). That is, the pulse period measurement section 38 resets the count value NT to 0 at the fall of the pulse 72, and then begins incrementing by one the count value NT in synchronization with the count clock CLK.

In the case when there is no noise such as chattering, change of the pulse signal PI from L level to H level is understood as the rise of the target pulse, which is the object of counting the pulse period τ_(P). Therefore, in the case when a pulse 70 is generated, counting of the pulse period τ_(P) up to then is completed, and counting of the next pulse period τ_(P) can be started, as described above. However, in the case when there is noise such as chattering, change of the pulse signal PI from L level to H level also occurs at the rise of chattering or another noise pulse, and the pulse period measurement section 38 may detect this change and generate a pulse 70.

The noise may cause a fall of the pulse signal PI in mid-course of the target pulse, followed by a rise. The variation of the pulse signal PI is caused substantially within a range that is sufficiently short compared with the duration of the original H level of the target pulse. Therefore, if the elapsed time from the pulse 72 based on the preceding fall to the pulse 70 is less than a designated inhibition period, a determination is made that the variation of the pulse signal PI is due to noise, and counting of the pulse period τ_(P) already being performed at present is continued. This process is performed by the pulse period measurement section 38 as exception handling in the case when a pulse 70 is generated for the rise detection signal LE.

The inhibition period Pd described above, which is clocked by the count value NT of the fall period counter, is used for this analysis, and the period is set in accordance with an assumed value of the period of chattering occurring at the ends of target pulses.

In the example shown in FIG. 3, the inhibition period Pd is set to two clocks of the count clock CLK. If the count value NT at the time of generation of the pulse 70 is less than “2”, then the pulse period measurement section 38 continues incrementing the count value NL (for example, at times T2, T3, and T4). On the other hand, if the count value NT at the time the pulse 70 is generated is “2” or more, then the count value NL is output at that time as a measured count value C that represents the pulse period τ_(P), the rise period counter is reset, and counting of the next pulse period τ_(P) is started (for example, at time T5).

In the conventional method, the position detected as the edge of the target pulses appearing in the pulse signal PI is at the timing after the chattering subsides. Therefore, the measurement values of the pulse period are varied by the variability of the chattering duration period, and a delay is caused in the detection of the pulse period τ_(P).

As opposed to this, according to the method of measurement of the pulse period τ_(P) in the motor speed controller 20, the measurement of the pulse period τ_(P) is started from a rise of the pulse signal PI before the chattering subsides, but in the case when the pulse is interrupted by short periods such as in chattering, the measurement of the pulse period τ_(P) is continued, as described above. Erroneous detection of chattering as the target pulses can thereby be suppressed. The measurement method makes it possible to measure pulse periods without being any effect from the variability of the periods of chattering in the forefronts of the pulses. Therefore, the pulse period τ_(P) can be measured with good precision. Because of a reduction in the delay until detection of the pulse period τ_(P), the stability of motor speed control can be improved.

The period of chattering is substantially proportional to the pulse period τ_(P) in the pulse signal PI. That is, it is preferable that the inhibition period Pd also be made proportional to the pulse period τ_(P). Here, because the motor speed controller 20 varies the frequency F_(C) of the count clock CLK in accordance with the target rotational speed ω_(T), the inhibition period Pd, which varies in proportion to the pulse period τ_(P), is a constant value that does not depend on the rotational speed ω when represented by the clock number of the count clock CLK. That is, the threshold (in the example in FIG. 3, “2”) of the count value NT of the fall period counter, which is used for determining whether the inhibition period Pd has passed at the time of the rise of the pulse period PI (at the time of generation of the pulse 70), can be set as a constant value that does not depend on the rotational speed ω.

[Countermeasures Against Out-Of-Control Reverse Rotation]

Because the pulse signal PI input from the motor module 26 to the motor speed controller 20 is monophase, the motor speed controller 20 cannot identify the direction of the rotational speed. There is a possibility that the motor speed controller 20 may encounter out-of-control reverse rotation of the motor. However, in the case of out-of-control reverse rotation, the motor speed controller 20 can detect this condition and restore the normal state. The motor speed controller 20 has an out-of-control reverse rotation determining section (not shown) for determining a state of out-of-control reverse rotation, and a restoration processor (not shown) for restoring the normal state. The out-of-control reverse rotation determining section and the restoration processor can be implemented, for example, using the pulse period measurement section 38, count clock generation circuit 40, feedback filter 44, PWM signal generation circuit 48, control register 34, and other components of the motor speed controller 20 performing a linked operation via the bus 50. As the out-of-control reverse rotation determining section and the restoration processor, an independent circuit block not shown in FIG. 1 may be provided, and the components of the motor speed controller 20 may be controlled in integrated fashion. This integral control can be implemented using the MPU 22, in which case the MPU 22 constitutes part of the motor speed controller related to the present invention.

In the out-of-control reverse rotation determining section, the composite signal generated by the synthesis circuit 46 is used as a monitored signal. In the case when a state continues for a designated period in which the control direction of the monitored signal with respect to the rotational speed ω is the reverse of the direction of the target rotational speed ω_(T), and in which the strength of the monitored signal exceeds a designated threshold, the out-of-control reverse rotation determining section determines the state of out-of-control reverse rotation in which the motor rotates out of control in the reverse of the direction of the target rotational speed ω_(T). When the out-of-control reverse rotation determining section detects the state of out-of-control reverse rotation, the restoration processor restores the rotational speed ω from the state of out-of-control reverse rotation toward the target rotational speed ω_(T). In the state of out-of-control reverse rotation, the compensation instruction signal is more dominant than the target instruction signal, making it possible to also use the compensation instruction signal as the monitored signal instead of the composite signal.

FIG. 4 is a flowchart illustrating the operation for determining a state of out-of-control reverse rotation. The motor speed controller 20 operates under normal control if a state of out-out-control reverse rotation is not detected (S5). The out-of-control reverse rotation determining section monitors the motor for the occurrence of out-of-control reverse rotation during operation under normal control (S10 to S25).

The direction of the target rotational speed ω_(T) can be ascertained from the target setting value Kr set in the drive target register 30. The control direction of the monitored signal with respect to the rotational speed ω can be ascertained from the sign of the composite signal. Accordingly, a determination as to whether the control direction of the monitored signal with respect to the rotational speed ω is the reverse of the direction of the target rotational speed ω_(T) can be made based on whether the sign of the target setting value Kr is different from the sign of the composite signal (S10). If the signs are the same, a determination is made that the motor is not rotating out of control in reverse, and normal control S5 is continued.

On the other hand, in the case when the signs are different, a determination is made as to whether the strength of the monitored signal, that is, the absolute value exceeds a designated threshold Vr (S15). If the absolute value of the composite signal is at or below the threshold Vr, a determination is made that the motor is not rotating out of control in reverse, and normal control S5 is continued. The threshold Vr can, for example, be set to a comparatively high value to the extent that this value allows the drive signal generated by the motor drive circuit 24 to reach saturation.

A monitoring timer is operated (S20) in the case when the absolute value of the composite signal exceeds the threshold Vr. In the monitoring timer operation S20, the monitoring timer is started if it is in a stopped state, and the monitoring timer value is incremented if the timer is already started.

The out-of-control reverse rotation determining section determines whether the monitoring timer value exceeds a designated value Tr (S25). Normal control S5 is continued while the monitoring timer value is at or below Tr. The monitoring timer is stopped and reset (S30) if a determination is made that the motor is not rotating out of control in reverse during that period in processes S10 and S15. On the other hand, if the monitoring timer value exceeds Tr, a determination is made that the motor is in a state of out-of-control reverse rotation (S35), and the operation of restoration to the normal state is started.

FIG. 5 is a flowchart illustrating the operation in which a normal state is restored. FIG. 6 is a schematic view illustrating the restoration operation, and shows the relationship between rotational speed w and pulse period τ_(P). In FIG. 6, the horizontal axis is rotational speed w, and the vertical axis is pulse period τ_(P).

The motor speed controller 20 moves to braking control in which the rotation of the motor is braked when a state of out-of-control reverse rotation is detected (S50). As braking control, a process may be performed, for example, in which the PWM signal generation circuit 48 sets the duty ratio of the PWM signal so that the motor drive circuit 24 generates in the motor a maximum driving force in the direction of stopping the rotation. The braking control may be based on another method; for example, it is also possible to use a short-circuit brake that forcibly short-circuits the terminals of the motor to stop the motor.

Here, as described above, a terminal braking speed ω_(BS) is set within a range in which the absolute value thereof is less than the limit ω_(L) of the low-speed side of the range R_(Δ), and the braking control ends at the terminal braking speed ω_(BS) in the case when feedback control is performed only within a designated range R_(Δ) that includes the target rotational speed ω_(T), and feedforward control alone is performed outside of the range R_(Δ). Here, the lower-speed limit ω_(L) is either the lower limit or the upper limit of the range R_(Δ), whichever has an absolute value less than that of the target rotational speed ω_(T). In the case when ω_(T)>0, for example, the lower limit of the range R_(Δ) is ω_(L).

Whether the rotational speed w has reached the terminal braking speed ω_(BS) can be determined on the basis of the measured count value C, which is measured by the pulse period measurement section 38. When a state of out-of-control reverse rotation is detected, the frequency F_(C) of the count clock CLK is changed from a value that corresponds to the target rotational speed ω_(T) to a value that corresponds to terminal braking speed ω_(BS) (S55). The measured count value C at the terminal braking speed ω_(BS) is thereby matched with the target count value C_(N) stored in the target count value register 32, and the error signal Ve at that time becomes 0.

For example, in the case when ω_(BS) is set within a range whose sign is opposite to that of the target rotational speed ω_(T), the condition C−C_(N)<0 is satisfied until ω reaches ω_(BS), that is, in the range |ω|>|ω_(BS)|, if braking is applied from the state of out-of-control reverse rotation; the condition C−C_(N)=0 is satisfied if ω=ω_(BS); and the condition C−C_(N)>0 is satisfied if ω exceeds ω_(BS) to further approach the stopped state, and the condition |ω|<|ω_(BS)| results. Therefore, the sign of the error signal Ve is monitored, and a determination can be made that the rotational speed ω has exceeded the terminal braking speed ω_(BS) when Ve>0 (S60).

Whether the rotational speed w has reached the terminal braking speed ω_(BS) can also be determined from the sign of the target rotational speed ω_(T) (or the terminal braking speed ω_(BS)) and the sign of the compensation instruction signal output from the feedback filter 44.

Normal control is restored (S65) when the terminal braking speed ω_(BS) is reached. In the operation of returning to normal control S65, the frequency F_(C) of the count clock CLK is returned to a value that corresponds to the target rotational speed ω_(T). The motor is accelerated by feedforward control until w reaches ω_(L). When ω reaches ω_(L), feedback control is started in addition to the feedforward control, and the normal state in which w is kept to the target rotational speed ω_(T) is recovered. The motor is still rotating in the direction opposite from that of the target rotational speed ω_(T) at the point when normal control is restored in the case when ω_(BS) is set to a sign opposite to that of the target rotational speed ω_(T), but the motor is further decelerated by the feedforward control and is caused to go further past ω=0 and start rotating in the same direction as the target rotational speed ω_(T). Also, when ω=ω_(L) is reached, feedback control is started as described above.

In the case when the range R_(Δ) for performing feedback control is not set, that is, in the case when feedforward control and feedback control are performed in parallel under normal control, the braking control must continue up to a rotational speed ω that does not resume the tend toward a state of out-of-control reverse rotation.

Here, speed (−ω_(T)), which has a reverse direction from, but the same magnitude as, the target rotational speed ω_(T), is the critical speed that serves as the boundary speed between tending toward out-of-control reverse rotation or tending toward the target rotational speed ω_(T) due to feedback control. In view of this, in the case when the range R_(Δ) is not set, the braking control is continued until the motor reaches a designated terminal braking speed ω_(BS) having a smaller absolute value than the critical speed (−ω_(T)), and at the point when |ω_(BS)|>|ω|, the motor is returned to the original normal control in which the feedforward control means and the feedback control means are used.

Control in which R_(Δ) is not set thus allows the terminal braking speed ω_(BS) to be set to a value that is substantially lower in absolute terms than the critical speed (−ω_(T)).

According to the present invention, the frequency of the count clock is varied in accordance with the target rotational speed ω_(T), and the count value C_(N) of the count clock within the pulse period τ_(P) at the target rotational speed is a constant value that does not depend on the target rotational speed. The weight β of the count value C_(N) per unit quantity of the frequency F_(P) of the pulse period PI is thereby brought to β=C_(N)/F_(P). The feedback control section generates a compensation instruction signal from an error signal (error signal Ve) generated on the basis of the count value C_(N) having weight β. At that time, the compensation instruction signal is scaled at a scaling factor Kr that is proportional to the target rotational speed. The scaling factor Kr is proportional to the frequency F_(P), and the gain in the feedback control section is a value that corresponds to the product of the weight β and the scaling factor Kr, and is a constant value that does not depend on the target rotational speed ω_(T). In the processing employed in this configuration, the circuit size and processing load are reduced because there is no additional need for division. 

1. A motor speed controller for controlling rotational speed of the motor on the basis of a pulse signal in which the pulse period varies in inverse proportion to the rotational speed, comprising: a count clock generator for generating a count clock with the clock frequency varying in accordance with a target rotational speed of the motor to keep a count value within the pulse period at the target rotational speed a constant target numerical value independent of the target rotational speed; and a feedback control section for bringing the rotational speed closer to the target rotational speed by feedback control, wherein the feedback control section comprises: a pulse period measurement section for counting the clock pulse in the pulse period at the current rotational speed and determining a measured count value; an error signal generator for generating an error signal that corresponds to the difference between the measured count value and the target count value; and a compensation instruction signal generator for generating a compensation instruction signal designed to adjust the rotational speed to the target rotational speed on the basis of the error signal, wherein the compensation instruction signal generator scales the compensation instruction signal at a scaling factor that is proportional to the target rotational speed.
 2. The motor speed controller of claim 1, further comprising: a feedforward control section for generating a target instruction signal that is defined in accordance with the target rotational speed, and setting the rotational speed to the target rotational speed by feedforward control; and a drive control section for generating a composite signal by combining the target instruction signal and the compensation instruction signal, and controlling the driving of the motor on the basis of the composite signal, wherein the feedforward control section comprises: a storage section for storing a target setting value that is set in accordance with the target rotational speed; and a target instruction signal generator for generating the target instruction signal on the basis of the target setting value, and the compensation instruction signal generator uses, as the scaling factor, the absolute value of the target setting value stored in the storage section.
 3. The motor speed controller of claim 2, wherein the storage section stores a relative value obtained by dividing the target rotational speed by the set upper-limit value thereof, and the target instruction signal generator has a multiplier for multiplying a signal that corresponds to the relative value by the set upper-limit value and outputting the product.
 4. The motor speed controller of claim 2, further comprising: an operation switching section for determining whether the current rotational speed is within a designated range with respect to the target rotational speed, operating the feedforward control section alone from among the feedforward control section and the feedback control section when the current rotational speed is outside the range, and operating both sections when the current rotational speed is within the range.
 5. The motor speed controller of claim 2, further comprising: an operation switching section for operating the feedforward control section alone from among the feedforward control section and the feedback control section during startup or during a change in the target setting value, and starting the operation of the feedforward control section if the rotational speed is within a designated range with respect to the target rotational speed.
 6. The motor speed controller of claim 4, wherein the compensation instruction signal generator generates the compensation instruction signal from the error signal by combination of proportional control, integral control, and derivative control.
 7. The motor speed controller of claim 4, wherein the previous arithmetic result of the compensation instruction signal generator is reset to an initial state when the generator stops operating. 